/**
 * @description React-UI Entry File
 */

import 'babel-polyfill'
import React from 'react'
import ReactDom from 'react-dom'
import './assets/scss/index.scss'
import { Provider } from 'react-redux'
import store from '@store'
import { RouterConfig } from '@/router'
import { IntlProvider } from 'react-intl'
import { LocaleProvider } from 'antd'
import { locale, messages, antdLocale } from './i18n/i18nProvider'

// Delelopment use fixture
// Use an easy-mock instead of an interceptor
// process.env.NODE_ENV === 'development' && require('@mock/fixture')
// require('@mock/fixture')

ReactDom.render(
  <IntlProvider locale={locale} messages={messages}>
    <LocaleProvider locale={antdLocale}>
      <Provider store={store}>
        <RouterConfig />
      </Provider>
    </LocaleProvider>
  </IntlProvider>,
  document.getElementById('app')
)
